shell date 命令说明 ; 日期转换
This technique is useful to give yourself a reminder based on a coming date, perhaps in a script or shell startup file, like so.
这个技巧非常有用,它可以根据将来的日期为自己设置提醒,可能是在脚本或Shell启动文件中,如下所示。
Then, run the command input line -- this can be several lines strung together with shell directives -- and finally, get the date again on the same input line.
然后,运行该命令输入行(可能是由 Shell 指令串联起来的几行内容),最后可以使用相同的输入行再次得到日期。
Suppose, for example, that you need to know the date two weeks hence. If you're at a shell prompt, you can get the answer immediately.
例如,您需要了解两星期以后的日期。
应用推荐